#!/usr/bin/env python
import sys
import class_set
import helper
from sets import Set

class FeedReducer(helper.ReducerHelper):

    def processor(self, key, lst):
        max_time_tag = None
        for e in lst:
            recom_tag = class_set.RecomTagFeed('')
            recom_tag.init(e)
            if max_time_tag is None:
                max_time_tag = recom_tag
            elif recom_tag.getTime() > max_time_tag.getTime():
                    max_time_tag = recom_tag
            else:
                pass
        left, right = self.split(key)
        self.allocator(left, max_time_tag)
        self.allocator(key, max_time_tag)

def main():
    fr = FeedReducer()
    fr.reducer()

if __name__ == '__main__':
    main()









